import request from '@/utils/request'

// 查询运行记事列表
export function listDiary(query) {
  return request({
    url: '/system/diary/list',
    method: 'get',
    params: query
  })
}

// 查询运行记事详细
export function getDiary(diaryId) {
  return request({
    url: '/system/diary/' + diaryId,
    method: 'get'
  })
}

// 新增运行记事
export function addDiary(data) {
  return request({
    url: '/system/diary',
    method: 'post',
    data: data
  })
}

// 修改运行记事
export function updateDiary(data) {
  return request({
    url: '/system/diary',
    method: 'put',
    data: data
  })
}

// 删除运行记事
export function delDiary(diaryId) {
  return request({
    url: '/system/diary/' + diaryId,
    method: 'delete'
  })
}

// 导出运行记事
export function exportDiary(query) {
  return request({
    url: '/system/diary/export',
    method: 'get',
    params: query
  })
}